<%-- 
    Document   : index
    Created on : Mar 12, 2013, 12:06:40 AM
    Author     : duonghung1369
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type="text/javascript">
            function draw(){
                var ctx = document.getElementById('canvas').getContext('2d');
                var img = new Image();
                img.src = document.getElementById('image').value;
                alert('aaaaaaaaaaa');
                //ctx.drawImage(document.getElementById('image').value, 0, 0);
            }
        </script>
    </head>
    <body>
        <h1>Hello World!</h1>
        <input id="image" type="file" />
        <input type="button" value="Load" onclick="draw();"/>
    <canvas id="canvas" width="100" height="100"></canvas>
        
    </body>
</html>
